package com.yqb.study.common.bean;

import java.util.Date;

import com.yqb.study.modular.persistence.model.OperateLog;

/**
 * 对象创建工厂
 */
public class BeanFactory {

    /**
     * 创建操作日志
     */
	public static OperateLog createOperateLog(final String logType, final String logName, final Integer userId,
			final String className, final String methodName, final String status, final String ip, final String request,
			final String result) {
		OperateLog operateLog = new OperateLog();
		operateLog.setLogType(logType);
		operateLog.setLogName(logName);
		operateLog.setUserId(userId);
		operateLog.setClassName(className);
		operateLog.setMethod(methodName);
		operateLog.setSucceed(status);
		operateLog.setIp(ip);
		operateLog.setRequest(request);
		operateLog.setResult(result);
		return operateLog;
	}
}
